home *** CD-ROM | disk | FTP | other *** search
- ; -----------------------------------------------------
- ; Peace and Protection (by misspai)
- ; -----------------------------------------------------
- ; Things behind the scenes
- ; -----------------------------------------------------
- ; Evaluating and tracking your
- ; addresses and nicknames
- ; -----------------------------------------------------
- alias _trackcode {
- set %-track.code $r(a,z) $+ $r(a,z) $+ $r(a,z) $+ $r(a,z) $+ $r(0,9) $+ $r(0,9) $+ $r(0,9) $+ $r(0,9)
- _qcr $me %-track.code
- .rlevel -r 200
- }
- on 1:ctcpreply:%-track.code:{
- set %-my.address $address
- if ($ip isin $address) disps Your address- %col.addr $+ $address $+ %col.att $+ (numeric IP)
- elseif (. isin $ip) disps Your address- %col.addr $+ $address $+ (IP- $ip $+ )
- }
- ; -----------------------------------------------------
- ; Tracks users who change nicks
- ; while you are trying to track them
- ; -----------------------------------------------------
- alias -l _nicktrac {
- if ($nick == %-keybop.nick) set %-keybop.nick $newnick
- if ($nick == %_last.ping) set %_last.ping $newnick
- if ($nick == %_last.whois) set %_last.whois $newnick
- if (%-fping. [ $+ [ $nick ] ] != $null) { set %-fping. [ $+ [ $newnick ] ] %-fping. [ $+ [ $nick ] ] | set %-fping. [ $+ [ $nick ] ] }
- if ($gettok(%-last.uctcp,1,32) == $nick) set %-last.uctcp $newnick $gettok(%-last.uctcp,2-,32)
- if ($findtok(%-last.clones,$nick,44) != $null) set %-last.clones $reptok(%-last.clones,$nick,$newnick,44)
- if (%+nickcolors) {
- if (%-nickcol. [ $+ [ $nick ] ] == %col.nicki) _nickcol $newnick $address $newnick $+ ! $+ $address *
- else _nickcol $newnick $address $newnick $+ ! $+ $address
- set %-nickcol. [ $+ [ $nick ] ]
- }
- if ($me == $nick) {
- if (%_away.why) .timer -m 1 1 _ncmyaway
- elseif (%-+backonnick) .timer -m 1 1 _ncmyback
- if (%+notify.hideme) {
- set %-+hide.unnotify. [ $+ [ $nick ] ] $true
- .timer 1 3 unset % $+ -+hide.unnotify. $+ $nick
- }
- if ((%s^c == ChanServ) && ($_not(%+nickserv.onlyifwarn))) .timer -m 1 1 auto npq
- }
- set %.var -lastt. $+ $fulladdress $+ *
- [ unset % $+ [ %.var ] ]
- }
- on 1:notice:*nick is owned by someone else*Please choose another*:?:if (($nick == NickServ) && (%s^c == ChanServ) && ((%+nickserv.onlyifwarn) || (%-recent.ns.login != $true))) auto npq
- on 1:notice:AUTHENTICATION SUCCESSFUL ON *:?:if (($address == cservice@undernet.org) && (%pp.net == undernet) && (($nick == X) || ($nick == W))) set %-authxw. [ $+ [ $_lchop(1,$4) ] ] $nick
- on 1:notice:Passwords are now mandatory. Please use the 'newpass' command now.:?:if (($address == cservice@undernet.org) && (%pp.net == undernet) && (($nick == X) || ($nick == W))) { set %.num $comchan($nick,0) | :loop | set %-authxw. [ $+ [ $comchan($nick,%.num) ] ] $nick | if ($_vd(.num) > 0) goto loop }
- alias _ncmyaway {
- if (%+pager) set %.qa.raw $_getmsg(away,pageron)
- else set %.qa.raw $_getmsg(away,pageroff)
- .raw away : $+ $_finalmsg($replace($replace($replace($replace(%.qa.raw,&reason&,%_away.why),&when&,%_away.ts),&pager&,$lower($_tf2o(%+pager))),&logging&,$lower($_tf2o(%+awaylog.on))))
- if (%-+awayonnick) {
- unset %-+awayonnick
- aame $_finalmsg($replace($replace($replace($replace($_getmsg(away,away),&reason&,%_away.why),&when&,%_away.ts),&pager&,$lower($_tf2o(%+pager))),&logging&,$lower($_tf2o(%+awaylog.on))))
- }
- if ($_not(%_+away.quiet)) if (%away.repeat > 60) .timer932 0 %away.repeat ame $_finalmsg($replace($replace($replace($replace($_getmsg(away,stillaway),&reason&,%_away.why),&when&,%_away.ts),&pager&,$lower($_tf2o(%+pager))),&logging&,$lower($_tf2o(%+awaylog.on))))
- }
- alias _ncmyback {
- aame $_finalmsg($replace($replace($replace($replace($_getmsg(away,back),&reason&,%-bon.why),&when&,$remove($remove($timestamp,[),])),&pager&,$lower($_tf2o(%+pager.here))),&awaytime&,%-bon.gone))
- unset %-+backonnick %-bon.*
- }
- ; -----------------------------------------------------
- ; Channel key memory
- ; -----------------------------------------------------
- raw 324:*:if ($2 ischan) _chkkey $2 | halt
- on 1:mode:#:if (k isin $1-) { _chkkey $chan | .timer923 1 1 _chkkey $chan }
- alias _chkkey if ($chan($1).key != $null) _writecfg Keys $1 $chan($1).key
- ; -----------------------------------------------------
- ; Userlist stamping
- ; -----------------------------------------------------
- ctcp 1:dcc:{
- if ($level($fulladdress) > 1) {
- writeini $_ppdir $+ userlist.ini seen $maddress($fulladdress) $ctime Saw
- if ($null == $readini $_ppdir $+ userlist.ini nick $maddress($fulladdress)) writeini $_ppdir $+ userlist.ini nick $maddress($fulladdress) $nick
- }
- }
- on 1:open:?:{
- if ($level($fulladdress) > 1) {
- writeini $_ppdir $+ userlist.ini seen $maddress($fulladdress) $ctime Saw
- if ($null == $readini $_ppdir $+ userlist.ini nick $maddress($fulladdress)) writeini $_ppdir $+ userlist.ini nick $maddress($fulladdress) $nick
- }
- }
- ; -----------------------------------------------------
- ; Detection and redisplay of text in
- ; the background color
- ; -----------------------------------------------------
- #whitetxt off
- on 1:text:*?*:*:_dowt t $1-
- on 1:action:*?*:*:_dowt a $1-
- on 1:chat:*?*:_dowt c $1-
- alias -l _dowt {
- ; %.b = your background color
- set %.b $calc($colour(back) % 16)
- set %.txt ! $_s2p($2-)
- set %.max $_i($count(%.txt,))
- set %.tok 2
- set %.bk %.b
- set %.fg ?
- :loop
- set %.ccol $gettok(%.txt,%.tok,3)
- if ($left(%.ccol,2) isnum) { set %.fg $calc($left(%.ccol,2) % 16) | set %.ccol $_rchop(2,%.ccol) }
- elseif ($left(%.ccol,1) isnum) { set %.fg $left(%.ccol,1) | set %.ccol $_rchop(1,%.ccol) }
- else goto inval
- if ($left(%.ccol,1) == ,) {
- if ($mid(%.ccol,2,2) isnum) set %.bk $calc($mid(%.ccol,2,2) % 16)
- elseif ($mid(%.ccol,2,1) isnum) set %.bk $mid(%.ccol,2,1)
- }
- if ((%.bk == %.b) && (%.fg == %.b)) goto white
- :inval
- if ($_vi(.tok) <= %.max) goto loop
- return
- :white
- if ($1 == c) echo $colour(ctcp) -i2 =$nick ½ $+ $nick $+ -invis╗ $_stripc($2-)
- elseif ($chan != $null) echo $colour(ctcp) -i2 $chan ½ $+ $nick $+ -invis╗ $_stripc($2-)
- else echo $colour(ctcp) -i2 $nick ½ $+ $nick $+ -invis╗ $_stripc($2-)
- }
- #whitetxt end
- ; -----------------------------------------------------
- ; Keeping voiced users sync'ed
- ; -----------------------------------------------------
- #voiceautosync off
- on 1:voice:#:set %.var -isvoc. $+ $nick $+ . $+ $chan | set % [ $+ [ %.var ] ] $true
- on 1:devoice:#:set %.var -isvoc. $+ $nick $+ . $+ $chan | set % [ $+ [ %.var ] ]
- on 1:nick:{
- set %.nk.ch $comchan($newnick,0)
- :loop
- set %.nk.var -isvoc. $+ $nick $+ . $+ $comchan($newnick,%.nk.ch)
- if (% [ $+ [ %.nk.var ] ] ) {
- set % [ $+ [ %.nk.var ] ]
- set %.nk.var -isvoc. $+ $newnick $+ . $+ $comchan($newnick,%.nk.ch)
- set % [ $+ [ %.nk.var ] ] $true
- }
- if ($_vd(.nk.ch) > 0) goto loop
- _nicktrac
- }
- on 1:deop:#:{
- set %.var -isvoc. $+ $nick $+ . $+ $chan
- if ((% [ $+ [ %.var ] ] ) && ($findtok(%-vsync.2update,$chan,44) == $null)) {
- set %-vsync.2update %-vsync.update $chan
- set %-vsync.2update $_s2c(%-vsync.2update)
- .timer928 1 3 _vresync
- }
- }
- on 1:part:#:set %.var -isvoc. $+ $nick $+ . $+ $chan | set % [ $+ [ %.var ] ]
- #voiceautosync end
- on 1:nick:_nicktrac
- ; -----------------------------------------------------
- ; ARP window
- ; -----------------------------------------------------
- alias arp {
- if (3.1 isin $os) _error This feature (ARP) only works on Windows 95.
- window -c @IPs
- dispa Detecting connected IPs...
- run -n $_ppdir $+ do-arp.bat $ddename $_ppdir /_arpdone -a
- }
- alias _arpdone {
- window -l $+ $_spec1d $_tabscale(29,38) @IPs $_winpos(9%,9%,3%,3%) @IPs %font.basic
- titlebar @IPs connected
- aline @IPs Named Host Numeric IP Notes
- set %.file $_ppdir $+ arp-temp.txt
- set %.line 3
- :loop1
- set %.data $read -nl [ $+ [ %.line ] ] %.file
- if (%.data != $null) {
- if (. isin %.data) aline @IPs %col.misc $+ ??? $+ $gettok(%.data,1,32) $+ $+ %col.misc $+ (none)
- inc %.line
- goto loop1
- }
- aline -s @IPs $chr(160)
- sline -r @IPs $sline(@IPs,1).ln
- if (%.line == 3) { aline %col.base @IPs No connected IPs detected. | aline @IPs (Note- this feature may not work properly on Windows NT.) | halt }
- aline %col.base @IPs Please wait, resolving IPs...
- .enable #_arpdns
- set %_arp.line $calc($line(@IPs,0) - 3)
- set %_arp.curr 2
- set %_arp.first $gettok($line(@IPs,2),2,9))
- set %.line 2
- unset %_qdns.*
- :loop2
- _qdns $gettok($line(@IPs,%.line),2,9)
- if (%.line <= %_arp.line) { inc %.line | goto loop2 }
- if ($server != $null) { set %_arp.server $server | _qdns $server }
- else unset %_arp.server
- if ($url == $null) unset %_arp.url
- else {
- if (// isin $url) set %_arp.url $gettok($url,2,47)
- else set %_arp.url $gettok($url,1,47)
- set %_arp.url $gettok($gettok(%_arp.url,1,58),1,64)
- if (%_arp.url != $null) _qdns %_arp.url
- }
- }
- alias -l _qdns {
- if (%_qdns.num == $null) { set %_qdns.num 1 | .dns $1 }
- else { set %_qdns. [ $+ [ %_qdns.num ] ] $1 | inc %_qdns.num }
- }
- #_arpdns off
- on 1:dns:{
- if (%_arp.first != $null) { if ($iaddress != %_arp.first) return | unset %_arp.first }
- if (%_arp.curr != $null) {
- if ($raddress == $null) rline @IPs %_arp.curr %col.misc $+ (failedátoáresolve) $+ $gettok($line(@IPs,%_arp.curr),2-,9)
- else rline @IPs %_arp.curr $raddress $+ $+ $gettok($line(@IPs,%_arp.curr),2-,9)
- if (%_arp.curr <= %_arp.line) inc %_arp.curr
- else {
- unset %_arp.curr
- if (%_arp.server != $null) rline %col.base @IPs $line(@IPs,0) Please wait, resolving IRC server...
- elseif (%_arp.url != $null) rline %col.base @IPs $line(@IPs,0) Please wait, resolving current URL...
- else _arptidy
- }
- }
- elseif (%_arp.server != $null) {
- set %_arp.servi $iaddress | set %_arp.servn $naddress | unset %_arp.server
- if (%_arp.url != $null) rline %col.base @IPs $line(@IPs,0) Please wait, resolving current URL...
- else _arptidy
- }
- else {
- set %_arp.urli $iaddress | set %_arp.urln $naddress | unset %_arp.url
- _arptidy
- }
- .timer -m 1 1 _doughnut
- }
- alias _doughnut {
- inc %_qdns.cur
- if (%_qdns. [ $+ [ %_qdns.cur ] ] != $null) { set %_qdns.cur %_qdns.cur | .dns %_qdns. [ $+ [ %_qdns.cur ] ] }
- }
- #_arpdns end
- alias -l _arptidy {
- .disable #_arpdns
- rline %col.base @IPs $line(@IPs,0) Please wait, collecting info...
- set %.line 2
- :loop1
- set %.named $gettok($line(@IPs,%.line),1,9)
- set %.ip $gettok($line(@IPs,%.line),2,9)
- unset %.notes
- unset %.color
- if ((%.ip == 127.0.0.1) || (%.ip == $ip)) set %.notes You ( $+ $me $+ )
- elseif ((%.ip == %_arp.urli) || (%.named == %_arp.urln)) set %.notes Current URL (WWW)
- elseif ((%.ip == %_arp.servi) || (%.named == %_arp.servn)) set %.notes IRC server
- elseif ((%.ip == %email.pop3) || (%.named == %email.pop3)) set %.notes POP3 (e-mail get)
- elseif ((%.ip == %email.smtp) || (%.named == %email.smpt)) set %.notes SMTP (e-mail send)
- else {
- set %.num $chat(0)
- if (%.num > 0) {
- :loop2
- if ($chat(%.num).ip == %.ip) set %.notes %.notes Chatáw/ $+ $chat(%.num)
- if ($_vd(.num) > 0) goto loop2
- }
- set %.num $send(0)
- if (%.num > 0) {
- :loop3
- if ($send(%.num).ip == %.ip) set %.notes %.notes Sendátoá $+ $send(%.num)
- if ($_vd(.num) > 0) goto loop3
- }
- set %.num $get(0)
- if (%.num > 0) {
- :loop4
- if ($get(%.num).ip == %.ip) set %.notes %.notes Getáfromá $+ $get(%.num)
- if ($_vd(.num) > 0) goto loop4
- }
- set %.num $fserv(0)
- if (%.num > 0) {
- :loop5
- if ($fserv(%.num).ip == %.ip) set %.notes %.notes FServeátoá $+ $fserv(%.num)
- if ($_vd(.num) > 0) goto loop5
- }
- if (%.notes == $null) set %.verb $true
- else set %.verb $false
- set %.wildi *!*@ $+ %.ip | set %.wildn *!*@ $+ %.named
- set %.num $ial(%.wildi,0)
- if (%.num > 0) {
- if (%.notes == $null) set %.color $strip($remove(%col.att,))
- :loop6
- if (%.verb) set %.notes %.notes ???áfromá $+ $+ $replace($ial(%.wildi,%.num),!,!)
- else set %.notes %.notes ( $+ $ial(%.wildi,%.num) $+ )
- if ($_vd(.num) > 0) goto loop6
- }
- set %.num $ial(%.wildn,0)
- if (%.num > 0) {
- if (%.notes == $null) set %.color $strip($remove(%col.att,))
- :loop7
- if (%.verb) set %.notes %.notes ???áfromá $+ $+ $replace($ial(%.wildn,%.num),!,!)
- else set %.notes %.notes ( $+ $ial(%.wildn,%.num) $+ )
- if ($_vd(.num) > 0) goto loop7
- }
- if (%.notes != $null) set %.notes $_s2cs(%.notes)
- else {
- set %.1st $gettok(%.named,1,46)
- if ($findtok(mail.smtp.pop3,%.1st,46) != $null) set %.notes (Probably mail)
- elseif ($findtok(http.www.home,%.1st,46) != $null) set %.notes (Probably WWW)
- elseif ($findtok(nntp.news,%.1st,46) != $null) set %.notes (Probably news)
- elseif (%.1st == ftp) set %.notes (Probably FTP)
- elseif ((ds* iswm %.1st) || (ns* iswm %.1st) || (dn* iswm %.1st)) set %.notes (Possibly DNS)
- elseif ((208.202.84.* iswm %.ip) || (38.161.232.* iswm %.ip) || (icq* iswm %.1st)) set %.notes (Probably ICQ)
- else { set %.notes Unknown source | set %.color $strip($remove(%col.att,)) }
- }
- }
- rline %.color @IPs %.line %.named $+ $+ %.ip $+ $+ %.notes
- if (%.line <= %_arp.line) { inc %.line | goto loop1 }
- rline %col.base @IPs $line(@IPs,0) Scan complete!
- window -b @IPs
- unset %_arp.* %_qdns.*
- halt
- }
- menu @IPs {
- Get new IP list:arp
- Rescan these IPs:window -c @IPs | _arpdone
- -
- /who selected addresses:set %.ln $sline(@IPs,0) | if (%.ln < 1) halt | :loop | _whoarp $sline(@IPs,%.ln).ln | if ($_vd(.ln) > 0) goto loop
- -
- Copy named host:clipboard $strip($gettok($sline(@IPs,1),1,9))
- Copy numeric IP:clipboard $gettok($sline(@IPs,1),2,9)
- Copy full line:clipboard $strip($replace($_f2s($sline(@IPs,1)),$chr(9),$chr(32)))
- -
- Save to file...:_askr _savearp Filename to save to?
- Close:window -c @IPs
- }
- alias _savearp {
- set %.file $_adddir($1-)
- write -c %.file Connected IPs, logged on $fulldate for $me ( $+ $ip $+ ) by Peace and Protection %pp.ver
- write %.file -
- set %.ln $line(@IPs,0) | set %.cr 1
- :loop
- write %.file $strip($line(@IPs,%.cr))
- if ($_vi(.cr) <= %.ln) goto loop
- _recfile2 %.file
- disps Connected IPs logged to %col.target $+ %.file $+ on $fulldate
- }
- alias _whoarp {
- if (($1 < 2) || ($1 >= $_j($line(@IPs,0)))) return
- set %.who1 $gettok($line(@IPs,$1),1,9)
- set %.who2 $gettok($line(@IPs,$1),2,9)
- if ($chr(40) !isin %.who1) .raw who %.who1
- .raw who %.who2
- }
- ; -----------------------------------------------------
- ; Windows that only close- First
- ; gives a popup, second simply
- ; closes immediately on right click.
- ; Both close on double click.
- ; -----------------------------------------------------
- menu @Close {
- dclick /window -c $active
- Close window:window -c $active
- }
- menu @Close2 {
- dclick /window -c $active
- $_exec(window -c [ $active ] ):{ }
- }
- menu @About {
- dclick /_abcde
- $_exec(_abcde):{ }
- }
- alias _abcde window -c @@ | window -c @á | window -c @áá | window -c @ááá | .play stop
- menu @Addons {
- dclick /_doaddon
- Close window:window -c $active
- }
- menu @Addon {
- dclick /_doaddon2
- Close window:window -c $active
- }
- menu @Patches {
- dclick /_dopatch
- Close window:window -c $active
- }
- menu @Colors1 {
- dclick /_cwinsel
- Close window:window -c $active
- }
- menu @Colors2 {
- dclick /_cwinsel2
- Close window:window -c $active
- }
- menu @ColorSelect {
- dclick /_clredit2
- Close window:window -c $active
- }
- menu @ColorSelect2 {
- dclick /_schquick
- Close window:window -c $active
- }
- menu @Revolve {
- dclick /_rsetclk
- Close window:window -c $active
- }
- menu @Actions {
- dclick /_asetclk
- Close window:window -c $active
- }
- menu @SchemeDelete {
- dclick /_schdel
- Close window:window -c $active
- }
-